using UnityEngine;
using UnityEngine.UI;

class DataItem : MonoBehaviour
{
    public DataItem(Text nameTx, Text valueTx)
    {
        NameTx = nameTx;
        ValueTx = valueTx;
    }

    [SerializeField] private Text NameTx;
    [SerializeField] private Text ValueTx;

    public string Name
    {
        get => NameTx.text;
        set => NameTx.text = value;
    }

    public string Value
    {
        get => ValueTx.text;
        set => ValueTx.text = value;
    }

    public void Show()
    {
        gameObject.SetActive(true);
    }

    public void Hide()
    {
        gameObject.SetActive(false);
    }
}